package org.example.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@RocketMQMessageListener(topic = "pers",consumerGroup = "my-consumer-group"
        ,maxReconsumeTimes = 2)
public class SimpleMsgListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println(s);
        System.out.println(new Date());
        String a=null;
        a.equals("11");
    }
}
